package org.daochong.fastdev;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import org.daochong.lang.BeanUtil;

public class SystemContextFilter implements IContextFilter {

	public boolean before(Context context) {
		Map<String, Object> attrs = new HashMap<String, Object>();
		context.setAttribute("System", attrs);
		attrs.put("startTime", new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date()));
		context.setId(BeanUtil.uuid());
		return true;
	}

	public void after(Context context) {

	}

	public void error(Context context) {

	}

}
